﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Security;
using System.Xml.Linq;

/// <summary>
/// Summary description for CtrlHumanResource
/// </summary>
public class CtrlHumanResource
{
    private CtrlBDHumanResource ctrlBDHumanResource;

    private int _iIdHumanResource;

    public int iIdHumanResource
    {
        get
        {
            return _iIdHumanResource;
        }
        set
        {
            _iIdHumanResource = value;
        }
    }


	public CtrlHumanResource()
	{
        ctrlBDHumanResource = new CtrlBDHumanResource();
	}

    public void addHumanResource(String sUsername, String sFirstName, String sLastName, String sPassword, String sPhone, String sEmail, int iRole, int iProfile)
    {
        HumanResource human = new HumanResource(sUsername, sPassword, sFirstName, sLastName, sEmail, sPhone, iProfile, iRole);
        ctrlBDHumanResource.addHumanResource(human);
    }

    public void setHumanResource(String sUsername, String sFirstName, String sLastName, String sPassword, String sPhone, String sEmail, int iRole, int iProfile)
    {
        HumanResource human = new HumanResource(iIdHumanResource, sUsername, sPassword, sFirstName, sLastName, sEmail, sPhone, iProfile, iRole);
        ctrlBDHumanResource.setHumanResource(human);
    }

    public HumanResource getHumanResource(int iId) 
    {
        iIdHumanResource = iId;
        return ctrlBDHumanResource.getHumanResource(iId);
    }



    public void deleteHumanResource(int iId) 
    {
        ctrlBDHumanResource.deleteHumanResource(iId);
    }

    public DataSet getData()
    {
        return ctrlBDHumanResource.getData();
    }

    public DataSet getDataC(int iId)
    {
        return ctrlBDHumanResource.getDataC(iId);
    }

}
